// pe14-1.cpp  -- using Wine class with containment
#include "PE3_QueueTp.h"

using std::cin; 
using std::cout; 
using std::endl;

int main(void) {
    WaiterSinger ws("lilith",10,2,6);
    Singer s("liliya", 10, 3);
    Waiter w("joy", 10, 5);

    QueueTp<Worker*> q(3);

    Worker* ws_ptr = &ws;
    Worker* s_ptr = &s;
    Worker* w_ptr = &w;
    
    q.enqueue(&ws_ptr);
    q.enqueue(&s_ptr);
    q.enqueue(&w_ptr);
    q.show();

    Worker* w0;
    q.dequeue(&w0);
    cout << w0 <<";"<< &w0 << ";" << endl;

    cout <<"QueueTp items:\n";
    q.show();

    cout <<"dequeue item show:\n";

    (*w0).show();
    // q.show();
    cout <<"dequeue again.\n";
    q.dequeue(&w0);

    cout <<"QueueTp items:\n";
    q.show();
    cout <<"dequeue item show:\n";
    w0->show();

    cout << "Bye\n";
    return 0;
}